import time
import redis

number_list = ['2003', '2002', '2001', '2000']
signal = ['1', '-1', '1', '-1']

rc = redis.StrictRedis(host='127.0.0.1', port='6379', db=0)
for i in range(len(number_list)):
    value_new = str(number_list[i]) + ' ' + str(signal[i])
    rc.publish("Tong", value_new)  #发布消息到Tong